package com.example.androidframework.ui.goods.holder

import android.view.View
import com.example.androidframework.R
import com.example.androidframework.databinding.ItemGoodsDetailServiceDescBinding
import com.martin.lib_base.annotation.ItemData
import com.martin.lib_base.base.BaseViewHolder
import com.martin.lib_base.bean.app.goods.ServiceBean
import com.martin.lib_base.interfaces.IItemData

@ItemData(ServiceDescViewHolder.Companion.ItemData::class)
class ServiceDescViewHolder(view: View) :
    BaseViewHolder<ServiceBean, ItemGoodsDetailServiceDescBinding>(view) {
    override fun onBindViewHolder(position: Int, item: Any?) {
        val bean: ServiceBean? = getItemBean(item)
        bean?.let {
            // 设置数据
            binding.title.text = it.title

            // 点击事件
            itemView.setOnClickListener {

            }
        }
    }

    companion object {
        class ItemData : IItemData {
            override fun getItemLayoutId(): Int {
                return R.layout.item_goods_detail_service_desc
            }

        }
    }
}